﻿
@model  List<SuperiorModel.Api_ProductItem>
@{

    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "商品列表";
    var spid = Request["spid"];
    var said = Request["said"];
}
<style>
    .weui-input {
        text-align: center;
    }
    * { touch-action: pan-y; } 
</style>
<header class="wy-header" LoadRequstCount ="@Model.Count">
    <div class="weui-search-bar" id="searchBar">
        <div class="weui_cell_hd"><img src="@UserContext.User.HeadImgUrl" alt="" /></div>
        <div class="weui-search-bar__form" >
            <div class="weui-search-bar__box">
                <i class="weui-icon-search"></i>
                <input type="search" class="weui-search-bar__input" value="@Request["keyword"]" id="searchInput" placeholder="搜索您想要的商品" required>
                <a href="javascript:" class="weui-icon-clear" id="searchClear"></a>
            </div>
            <label class="weui-search-bar__label" id="searchText" style="transform-origin: 0px 0px 0px; opacity: 1; transform: scale(1, 1);">
                <i class="weui-icon-search"></i>
                <span>搜索您想要的商品</span>
            </label>
        </div>
        <a href="javascript:" class="weui-search-bar__cancel-btn" style="color: #ccc;" id="searchCancel">取消</a>
    </div>
    
</header>
<!--主体-->
<div class="weui-content">
    <!--产品列表--滑动加载-->

    <div  class='demos-content-padded proListWrap'>


        <div class="wy-Module">
            <div class="wy-Module-con">
                <ul class="wy-pro-list clear" style="padding-top:25px;" id="list">
                    @if (Model.Count > 0)
                    {
                        foreach (var item in Model)
                        {
                            <li>
                                <a href="/Product/Detail?spid=@spid&said=@said&id=@item.Id">
                                    <div class="proimg"><img src="@item.ImgPath"></div>
                                    <div class="protxt">
                                        <div class="name">@item.ProductName</div>
                                        <div class="wy-pro-pri">¥<span>@item.SallPrice</span></div>
                                    </div>
                                </a>
                            </li>
                        }
                    }
                    else
                    {
                       <div style="text-align:center">暂无商品</div>
                        
                    }


                </ul>
            </div>
        </div>




    </div>
    <div class="weui-loadmore" style="display:none">
        <i class="weui-loading"></i>
        <span class="weui-loadmore__tips">正在加载</span>
    </div>
</div>

<script src="~/scripts/Product/MenuProductList.js?v=123"></script>

<script>
    MenuProductList.Instance.Init();
     
</script>